this.cf=this.cf||{},this.cf.metaboxes=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=41)}([function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.cf.vendor["callbag-basics"]}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.cf.core}()},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.cf.vendor.immer}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.cf.vendor["refract-callbag"]}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){var r=n(24),o=n(25),i=n(26);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(34),o=n(35),i=n(36);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(27),o=n(7);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(28);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.cf.vendor.classnames}()},function(e,t){e.exports=(e=>t=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return y}),n.d(r,"updateState",function(){return g}),n.d(r,"updateFieldValue",function(){return h}),n.d(r,"addFields",function(){return w}),n.d(r,"cloneFields",function(){return x}),n.d(r,"removeFields",function(){return E}),n.d(r,"addContainer",function(){return S}),n.d(r,"removeContainer",function(){return I}),n.d(r,"receiveSidebar",function(){return F}),n.d(r,"lockSaving",function(){return T}),n.d(r,"unlockSaving",function(){return A});var o={};n.r(o),n.d(o,"getContainers",function(){return C}),n.d(o,"getContainerById",function(){return D}),n.d(o,"getFields",function(){return N}),n.d(o,"getFieldsByContainerId",function(){return k}),n.d(o,"getFieldById",function(){return G}),n.d(o,"isSavingLocked",function(){return P}),n.d(o,"isDirty",function(){return L}),n.d(o,"isFieldUpdated",function(){return R}),n.d(o,"getComplexGroupValues",function(){return B});var i=n(6),c=n(3),a=n(2),u=n(0),l=n.n(u),s=n(8),d=n.n(s),f=n(5),p=n.n(f),b=n(9),m=n.n(b),v=n(4);function O(e,t,n){var r=t[e];return"complex"===r.type&&r.value.forEach(function(e){n=e.fields.reduce(function(e,n){return O(n.id,t,e)},n)}),n.concat(e)}var j=Object(a.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return m()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(u.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return m()(e,function(n){var r=t.payload,o=r.fieldId,i=r.value,c=r.fieldsToRemove;n[o].value=i,c.reduce(function(t,n){return O(n,e,t)},[]).forEach(function(e){Object(u.unset)(n,e)})});case"ADD_FIELDS":return m()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return m()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(u.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(v.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(v.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(u.assign)(e,Object(u.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return O(n,e,t)},[]);return Object(u.omit)(e,n);case"RECEIVE_SIDEBAR":return m()(e,function(e){Object(u.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return p()({},e,d()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(u.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}},isFieldUpdated:function(e,t){switch(t.type){case"UPDATE_FIELD_VALUE":return{action:t};default:return!1}}});function y(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function h(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t,fieldsToRemove:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]}}}function w(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function x(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function E(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function S(e){return{type:"ADD_CONTAINER",payload:e}}function I(e){return{type:"REMOVE_CONTAINER",payload:e}}function F(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function T(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function A(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function C(e){return e.containers}function D(e,t){return e.containers[t]}function N(e){return e.fields}function k(e,t){return Object(u.filter)(e.fields,["container_id",t])}function G(e,t){return e.fields[t]}function P(e){return Object.keys(e.savingLock).length>0}function L(e){return e.isDirty}function R(e){return e.isFieldUpdated}function B(e,t){var n=Object(u.pick)(N(e),t);return n=Object(u.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(u.mapValues)(n,function(e){return e.value})}function U(e,t,n){return(e=Object(u.cloneDeep)(e)).id=Object(v.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(v.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return U(e,t,n)})}),n.push(e),Object(u.pick)(e,["id","type","name","base_name"])}function V(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(u.endsWith)(t,"__i__")}).map(function(e){return Object(u.assign)({},e,{fields:e.fields.map(function(n){return U(n,e.id,t)})})}),fields:t}}Object(a.registerStore)("carbon-fields/metaboxes",{reducer:j,actions:r,selectors:o});var q=V(Object(u.get)(window.cf,"preloaded.containers",[])),Q=q.containers,K=q.fields;Object(a.dispatch)("carbon-fields/metaboxes").setupState(Object(u.keyBy)(Q,"id"),Object(u.keyBy)(K,"id"));var M=n(10),W=Object(M.createHigherOrderComponent)(function(e){var t=Object(a.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i&&i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(a.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(M.compose)(t,n)(e)},"withField"),$=n(13),z=n.n($),H=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){if(0===e){var r=!1;for(n(0,function(e){2===e&&(r=!0,t.length=0)});0!==t.length;)n(1,t.shift());r||n(2)}}};const J={};var X=function(e,t){return e===t},Y=function(e){return void 0===e&&(e=X),function(t){return function(n,r){if(0===n){var o,i,c=!1;t(0,function(t,n){0===t&&(i=n),1===t?c&&e(o,n)?i(1):(c=!0,o=n,r(1,n)):r(t,n)})}}}},Z=n(1);function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return void 0===e?[]:Object(u.pick)(t,Object(u.difference)(Object(u.map)(e.fields,"id"),n))}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(u.map)(e,function(e){return[e.id,"".concat(Object(u.repeat)("parent.",t)).concat(e.base_name)]})}var ne=Object(v.withConditionalLogic)(function(e,t){var n=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(Z.pipe)(Object(Z.merge)(H(n(e.containerId)),Object(v.fromSelector)(n,e.containerId)),(e=>t=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=J;t(0,(t,n)=>{if(0===t)return o=n,e(0,(e,t)=>{if(0!==e)return 1===e?(a=void 0,i(2),o(2),void(c&&r(2))):void(2===e&&(i=null,a=t,null!=t&&(o(2),c&&r(e,t))));(i=t)(1)}),c=!0,r(0,(e,t)=>{a===J&&(2===e&&i&&i(2),o(e,t))}),void(a!==J&&r(2,a));2===t&&i(2),a===J&&r(t,n)})})(t.unmount),Y(u.isEqual))},function(e,t){t=Object(u.keyBy)(t,"id");var n=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(u.some)(n.fields,["id",e.id]))r=te(r=ee(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(u.find)(t,function(t){return t.container_id===e.containerId&&Object(u.startsWith)(o,t.name)}),c=o.split(/\[|\]/g);c.shift(),(c=c.filter(function(e){return""!==e})).pop();var l=c.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=te(r=ee(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");c.length>0;){var d=c.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=ee(Object(u.get)(t,s),t,[e.id]);r=r.concat(te(b,l)),s="".concat(s,".fields")}if(p){var m=Object(u.find)(Object(u.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=z()(e,2),r=n[0];return[n[1],Object(u.get)(t,"".concat(r,".value"))]}),Object(u.fromPairs)(r)});function re(){return!Object(u.isUndefined)(window._wpLoadBlockEditor)}function oe(e,t){return Object(u.find)(e,function(e){return e.name===t})}Object(c.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(v.withProps)(function(e){return{hierarchyResolver:function(){var t,n,r,o,i=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),c=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),l=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g);if(l=l.filter(function(e){return""!==e}),"widget"===i.type)return e.field.base_name;for(var s=oe(c,l.shift()),d=c.indexOf(s),f=s.base_name;l.length>0;){var p=l.shift(),b=!isNaN(p),m=p===e.field.base_name,v=!b&&!m;if(b&&(d="".concat(d,".value.").concat(p,".name"),f="".concat(f,"[").concat(p,"]:").concat(Object(u.get)(c,d),"/")),v){var O=oe(Object(u.get)(c,d.replace(/\.name$/,".fields")),p),j=Object(u.find)(c,["id",O.id]);d=c.indexOf(j),f="".concat(f).concat(j.base_name)}m&&(f="".concat(f).concat(p))}return f}}}));var ie=n(16),ce=n.n(ie),ae=n(17),ue=n.n(ae),le=n(18),se=n.n(le),de=n(19),fe=n.n(de),pe=n(20),be=n.n(pe),me=n(7),ve=n.n(me),Oe=n(12),je=(n(29),n(30),Object(M.compose)(W,Object(v.withFilters)("carbon-fields.field-wrapper.metabox"))(v.Field)),ye=function(e){function t(){var e,n;ce()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=se()(this,(e=fe()(t)).call.apply(e,[this].concat(o))),d()(ve()(ve()(n)),"handleAddGroup",function(e,t){var r=n.props,o=r.id,i=r.field,c=r.value,a=r.addFields,l=r.onChange;e=Object(u.cloneDeep)(e);var s=[];e.id=Object(v.uniqueId)(),e.container_id=i.container_id,e.fields=e.fields.map(function(e){return U(e,i.container_id,s)}),e.collapsed=!1,a(s),l(o,c.concat(e)),t(e)}),d()(ve()(ve()(n)),"handleCloneGroup",function(e,t){var r=n.props,o=r.id,i=r.value,c=r.cloneFields,a=r.onChange,l=e.fields.map(function(e){return e.id}),s=l.map(function(){return Object(v.uniqueId)()}),d=Object(u.cloneDeep)(e);d.id=Object(v.uniqueId)(),d.fields.forEach(function(e,t){e.id=s[t]}),c(l,s),a(o,m()(i,function(t){t.splice(i.indexOf(e)+1,0,d)})),t(d)}),d()(ve()(ve()(n)),"handleRemoveGroup",function(e){var t=n.props,r=t.id,o=t.value;(0,t.onChange)(r,Object(u.without)(o,e),e.fields.map(function(e){return e.id}))}),d()(ve()(ve()(n)),"handleToggleGroup",function(e){var t=n.props,r=t.field,o=t.value;(0,t.onChange)(r.id,m()(o,function(t){var n=Object(u.find)(t,["id",e]);n.collapsed=!n.collapsed}))}),d()(ve()(ve()(n)),"handleToggleAllGroups",function(e){var t=n.props,r=t.field,o=t.value;(0,t.onChange)(r.id,m()(o,function(t){t.forEach(function(t){t.collapsed=e})}))}),d()(ve()(ve()(n)),"handleGroupSetup",function(e,t){return Object(u.assign)({},t,{id:e.id,name:e.name,prefix:"".concat(n.props.name,"[").concat(t.index,"]"),fields:e.fields,collapsed:e.collapsed,context:"metabox"})}),d()(ve()(ve()(n)),"handleGroupFieldSetup",function(e,t,r){return[je,Object(u.assign)({},t,{key:e.id,id:e.id,containerId:n.props.containerId,name:"".concat(r.prefix,"[").concat(e.name,"]")})]}),n}return be()(t,e),ue()(t,[{key:"render",value:function(){var e=this.handleGroupSetup,t=this.handleGroupFieldSetup,n=this.handleAddGroup,r=this.handleCloneGroup,o=this.handleRemoveGroup,i=this.handleToggleGroup,c=this.handleToggleAllGroups,a=this.props,u=a.value;return(0,a.children)({allGroupsAreCollapsed:u.every(function(e){return e.collapsed}),handleGroupSetup:e,handleGroupFieldSetup:t,handleAddGroup:n,handleCloneGroup:r,handleRemoveGroup:o,handleToggleGroup:i,handleToggleAllGroups:c})}}]),t}(Oe.Component),ge=Object(a.withSelect)(function(e,t){var n=e("carbon-fields/metaboxes").getComplexGroupValues;return{groupValues:t.value.map(function(e){var t=e.fields.map(function(e){return e.id});return[e.name,n(t)]})}}),he=Object(a.withDispatch)(function(e){var t=e("carbon-fields/metaboxes");return{addFields:t.addFields,cloneFields:t.cloneFields}});Object(c.addFilter)("carbon-fields.complex.metabox","carbon-fields/metaboxes",function(e){return Object(M.compose)(ge,he)(function(t){var n=t.id,r=t.field,o=t.name,i=t.value,c=t.groupValues;return wp.element.createElement(ye,t,function(a){var u=a.allGroupsAreCollapsed,l=a.handleGroupSetup,s=a.handleGroupFieldSetup,d=a.handleAddGroup,f=a.handleCloneGroup,p=a.handleRemoveGroup,b=a.handleToggleGroup,m=a.handleToggleAllGroups;return wp.element.createElement(e,{groupIdKey:"id",groupFilterKey:"name",id:n,field:r,name:o,value:i,groupValues:c,allGroupsAreCollapsed:u,onGroupSetup:l,onGroupFieldSetup:s,onAddGroup:d,onCloneGroup:f,onRemoveGroup:p,onToggleGroup:b,onToggleAllGroups:m,onChange:t.onChange})})})});var _e=n(14),we=n.n(_e);Object(c.addFilter)("carbon-fields.date_time.metabox","carbon-fields/metaboxes",function(e){return function(t){return wp.element.createElement(e,we()({buttonText:Object(i.__)("Select Date","carbon-fields-ui")},t))}}),Object(c.addFilter)("carbon-fields.file.metabox","carbon-fields/metaboxes",function(e){return function(t){return wp.element.createElement(e,we()({buttonLabel:Object(i.__)("Select File","carbon-fields-ui"),mediaLibraryButtonLabel:Object(i.__)("Use File","carbon-fields-ui"),mediaLibraryTitle:Object(i.__)("Select File","carbon-fields-ui")},t))}}),Object(c.addFilter)("carbon-fields.image.metabox","carbon-fields/metaboxes",function(e){return function(t){return wp.element.createElement(e,we()({buttonLabel:Object(i.__)("Select Image","carbon-fields-ui"),mediaLibraryButtonLabel:Object(i.__)("Use Image","carbon-fields-ui"),mediaLibraryTitle:Object(i.__)("Select Image","carbon-fields-ui")},t))}}),n(31),n(32),Object(c.addFilter)("carbon-fields.media_gallery.metabox","carbon-fields/metaboxes",function(e){return function(t){return wp.element.createElement(e,we()({buttonLabel:Object(i.__)("Select Attachments","carbon-fields-ui"),mediaLibraryButtonLabel:Object(i.__)("Use Attachments","carbon-fields-ui"),mediaLibraryTitle:Object(i.__)("Select Attachments","carbon-fields-ui")},t))}}),n(33),Object(c.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(a.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(c.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(M.compose)(W,ne,Object(a.withDispatch)(function(e){if(re()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),v.withValidation));var xe=n(11),Ee=Object(xe.withEffects)(function(){return Object(v.fromSelector)(Object(a.select)("carbon-fields/metaboxes").isSavingLocked)},{handler:function(){return function(e){document.querySelectorAll('\n\t\t\t#publishing-action input#publish,\n\t\t\t#publishing-action input#save,\n\t\t\t#addtag input#submit,\n\t\t\t#edittag input[type="submit"],\n\t\t\t#your-profile input#submit\n\t\t').forEach(function(t){t.disabled=e})}}})(function(){return null}),Se=(...e)=>t=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function Ie(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function Fe(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function Te(e){for(var t=[],n=e,r=Fe(e);r>0&&n;)if(Fe(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Ae={post_ancestors:[],post_parent_id:0,post_level:1};function Ce(e){var t=e.options[e.selectedIndex];return{post_ancestors:Te(t),post_parent_id:Ie(t),post_level:Fe(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(Z.pipe)(Object(Z.fromEvent)(e,"change"),Object(Z.map)(function(e){return Ce(e.target)}),Se(Ce(e))):H(Ae)}),Object(c.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(Z.pipe)(Object(Z.combine)(Object(v.fromSelector)(Object(a.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"parent")),Y(u.isEqual),Object(Z.map)(function(e){var r=z()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Ae;var a=t(i);if(!Object(u.get)(a,["hierarchical"],!1))return Ae;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(u.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var De=n(22),Ne=n.n(De),ke=(e,t,n)=>Ne()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),Ge={post_format:"standard"};function Pe(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(c.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(Z.pipe)(ke(e,"input.post-format","change"),Object(Z.map)(function(e){return Pe(e.target)}),Se(Pe(e.querySelector("input.post-format:checked")))):H(Ge)}),Object(c.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(Z.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"format"),Y(),Object(Z.filter)(Boolean),Object(Z.map)(function(e){return{post_format:e}}),Se(Ge))});var Le={post_template:""};function Re(e){var t=e.value;return"default"===t&&(t=""),{post_template:t}}Object(c.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(Z.pipe)(Object(Z.fromEvent)(e,"change"),Object(Z.map)(function(e){return Re(e.target)}),Se(Re(e))):H(Le)}),Object(c.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(Z.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"template"),Y(),Object(Z.filter)(u.isString),Object(Z.map)(function(e){return{post_template:e}}),Se(Le))});var Be=n(15),Ue=n.n(Be),Ve=",";function qe(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(qe(window.tagBox,"parseTags"),qe(window.tagBox,"flushTags")),Object(c.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(Z.pipe)(Z.merge.apply(void 0,Ue()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Ue()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(Z.pipe)(ke(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(Z.scan)(function(e,n){var r=n.target;return m()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(u.pull)(e[t],n)})},d()({},t,[])),Se(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Ue()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},d()({},e,[]))}(t)))}))).concat(Ue()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Ue()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(Z.pipe)(Object(Z.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(Z.map)(function(e){var n=e.target;return d()({},t,n.value?n.value.split(Ve):[])}),Se(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(Ve):[];return d()({},e,n)}(t)))})}()))),Object(Z.scan)(function(e,t){return{post_term:p()({},e.post_term,t)}},{post_term:{}}));var e}),Object(c.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core").getTaxonomies,t=Object(a.select)("core/editor").getEditedPostAttribute;return Object(Z.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(Z.filter)(Boolean),Object(Z.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(u.fromPairs)(n)}}))});var Qe={term_ancestors:[],term_parent:0,term_level:1};function Ke(e){var t=e.options[e.selectedIndex];return{term_ancestors:Te(t),term_parent:Ie(t),term_level:Fe(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(Z.pipe)(Object(Z.fromEvent)(e,"change"),Object(Z.map)(function(e){return Ke(e.target)}),Se(Ke(e))):H(Qe)});var Me={user_role:""};function We(e){return{user_role:e.value}}Object(c.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return H(t?{user_role:t.dataset.profileRole}:Me)}return Object(Z.pipe)(Object(Z.fromEvent)(e,"change"),Object(Z.map)(function(e){return We(e.target)}),Se(We(e)))});var $e=Object(M.createHigherOrderComponent)(function(e){return Object(a.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(c.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(M.compose)($e,Object(v.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(c.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(xe.withEffects)(function(){return Object(v.fromSelector)(Object(a.select)("carbon-fields/metaboxes").isFieldUpdated)},{handler:function(e){return function(t){var n=t.action;if(n){var r=e.container,o=n.payload;r.fields.map(function(e){return e.id}).indexOf(o.fieldId)>=0&&window.jQuery(".container-".concat(r.id)).closest(".widget-inside").trigger("change")}}}}));var ze=n(23),He=n.n(ze);function Je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t};return He()(function(r){var o=function(){return r(1,n.apply(void 0,arguments))};return e(o),function(){return t(o)}})}Object(c.addFilter)("carbon-fields.term_meta.classic","carbon-fields/metaboxes",Object(xe.withEffects)(function(){return Object(Z.pipe)(Je(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{options:n,data:r}}),Object(Z.filter)(function(e){var t=e.options,n=e.data;return t.data&&t.data.indexOf("carbon_fields_container")>-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=l.a.map(e.container.fields,"id"),n=V(l.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=l.a.find(r,["id",e.id]),c=l.a.filter(o,["container_id",e.id]),u=Object(a.dispatch)("carbon-fields/metaboxes"),s=u.updateState,d=u.removeFields;s(l.a.keyBy([i],"id"),l.a.keyBy(c,"id")),d(t)}}})),n(38),Object(c.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(xe.withEffects)(function(){return Object(Z.pipe)(Object(Z.fromEvent)(window,"scroll"),Object(Z.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(39);var Xe=n(21),Ye=n.n(Xe),Ze=(n(40),function(e){function t(){var e,n;ce()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=se()(this,(e=fe()(t)).call.apply(e,[this].concat(o))),d()(ve()(ve()(n)),"state",{currentTab:null}),d()(ve()(ve()(n)),"renderField",function(e){var t=Object(v.getFieldType)(e.type,"metabox");return t?wp.element.createElement(je,{key:e.id,id:e.id},wp.element.createElement(t,{id:e.id,containerId:n.props.id})):null}),d()(ve()(ve()(n)),"handleTabClick",function(e){n.setState({currentTab:e})}),n}return be()(t,e),ue()(t,[{key:"componentDidMount",value:function(){var e=this.props.container;this.isTabbed(e)&&this.setState({currentTab:Object.keys(e.settings.tabs)[0]})}},{key:"isTabbed",value:function(e){return Object(u.isPlainObject)(e.settings.tabs)}},{key:"render",value:function(){var e=this,t=this.state.currentTab,n=this.props.container,r=this.isTabbed(n),o=Ye()(["cf-container","cf-container-".concat(n.id),"cf-container-".concat(Object(u.kebabCase)(n.type))].concat(Ue()(n.classes),[{"cf-container--plain":!r}]));return wp.element.createElement("div",{className:o},wp.element.createElement("input",{type:"hidden",name:n.nonce.name,value:n.nonce.value}),r&&wp.element.createElement("div",{className:"cf-container__tabs"},wp.element.createElement("ul",{className:"cf-container__tabs-list"},Object(u.map)(n.settings.tabs,function(n,r){var o=Ye()("cf-container__tabs-item",{"cf-container__tabs-item--current":r===t});return wp.element.createElement("li",{key:r,className:o,tabIndex:-1,role:"tab","aria-selected":t===r},wp.element.createElement("button",{type:"button",onClick:function(){return e.handleTabClick(r)}},r))}))),r&&Object(u.map)(n.settings.tabs,function(r,o){return wp.element.createElement("div",{className:"cf-container__fields",key:o,hidden:o!==t},Object(u.map)(r,function(t){var r=Object(u.find)(n.fields,["name",t]);return e.renderField(r)}))}),!r&&wp.element.createElement("div",{className:"cf-container__fields"},Object(u.map)(n.fields,this.renderField)))}}]),t}(Oe.Component)),et=Object(v.createRegistry)("container",["classic","gutenberg"]),tt=et.registerContainerType,nt=et.getContainerType;function rt(e,t){var n=document.querySelector(".container-".concat(e.id)),r=nt(e.type,t);n?Object(Oe.render)(wp.element.createElement(r,{id:e.id}),n,function(){n.dataset.mounted=!0}):console.error(Object(i.sprintf)(Object(i.__)('Could not find DOM element for container "%1$s".',"carbon-fields-ui"),e.id))}["post_meta","term_meta","user_meta","comment_meta","network","theme_options","nav_menu_item","widget"].forEach(function(e){return tt(e,Ze)});var ot={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},it={comparers:[p()({},ot,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),p()({},ot,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),p()({},ot,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n;default:return!1}}})],isFulfiled:function(e,t){var n=e.compare,r=e.value;return this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},firstComparerIsCorrect:function(e,t,n){var r=Object(u.find)(this.comparers,function(e){return e.isOperatorSupported(t)});return r?r.evaluate(e,t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition comparison operator used - "%1$s".',"carbon-fields-ui"),t)),!1)},getEnvironmentValue:function(e,t){return t[e.type]}},ct=p()({},it,{getEnvironmentValue:function(){return!0}}),at=p()({},ot,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return Object(u.includes)(e,n);case"!=":return!Object(u.includes)(e,n);default:return!1}}}),ut=p()({},it,{comparers:[at],isFulfiled:function(e,t){var n=this,r=e.compare,o=e.value;if(Object(u.isArray)(o)){var i;switch(r){case"IN":r="=",i="some";break;case"NOT IN":r="!=",i="every";break;default:return!1}return o.map(function(o){return n.isFulfiled(p()({},e,{compare:r,value:o}),t)})[i](Boolean)}return o=o.taxonomy_object.hierarchical?o.term_object.term_id:o.term_object.name,this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),r,o)},getEnvironmentValue:function(e,t){return Object(u.get)(t,"post_term.".concat(e.value.taxonomy),[])}}),lt=p()({},it,{isFulfiled:function(e,t){if("default"===(e=p()({},e)).value)e.value="";else if(Object(u.isArray)(e.value)){var n=e.value.indexOf("default");-1!==n&&(e.value[n]="")}return it.isFulfiled(e,t)}}),st=p()({},ot,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return Object(u.intersection)(e,n).length>0;case"NOT IN":return 0===Object(u.intersection)(e,n).length;default:return!1}}}),dt=p()({},it,{comparers:[at,st],getEnvironmentValue:function(e,t){return Object(u.get)(t,"post_ancestors",[])}}),ft=p()({},it,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),pt=p()({},it,{comparers:[at,st],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(u.get)(t,"term_ancestors",[])}}),bt={boolean:ct,post_term:ut,post_ancestor_id:dt,post_parent_id:it,post_level:it,post_format:it,post_template:lt,term_level:it,term_parent:ft,term_ancestor:pt,user_role:it},mt=Object(a.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),vt=Object(xe.withEffects)(function(e,t){var n=t.context,r=Object(c.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(c.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(c.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),a=Object(c.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),l=Object(c.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),s=Object(c.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(Z.pipe)(Object(Z.merge)(r,o,i,a,l,s),Object(Z.scan)(function(e,t){return m()(e,function(e){Object(u.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(u.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(u.get)(bt,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=z()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o)),u=!!a.dataset.mounted;c&&(c.hidden=!i),a&&(i&&!u&&rt(t[o],n),!i&&u&&(delete a.dataset.mounted,a._reactRootContainer.unmount()))})}}}),Ot=Object(M.compose)(mt,vt)(function(){return null});function jt(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var yt="customize.php",gt="carbon_fields_container_",ht=Object(xe.withEffects)(function(){return Object(Z.merge)(Object(Z.pipe)(Je(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(Z.filter)(function(e){return e.$widget[0].id.indexOf("carbon_fields_")>-1}),Object(Z.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(Z.pipe)(Je(function(e){return window.jQuery(document).on("ajaxSend",e)},function(e){return window.jQuery(document).off("ajaxSend",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(Z.filter)(function(e){var t=e.options;return Object(u.startsWith)(t.data,gt)}),Object(Z.map)(function(e){return{type:"WIDGET_BEIGN_UPDATED_OR_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(a.select)("carbon-fields/metaboxes").getContainerById,n=Object(a.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,c=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l=e.payload,s=l.event,d=l.$widget,f=Object(u.flow)(jt,JSON.parse)(d.find("[data-json]").data("json")),p=[];if(f.fields=f.fields.map(function(e){return U(e,f,p)}),i(p),r(f),rt(f,"classic"),window.cf.config.pagenow===yt&&"widget-added"===s.type){var b=d.find('[name="widget-id"]').val();d.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(b).liveUpdateMode=!1}break;case"WIDGET_BEIGN_UPDATED_OR_DELETED":var m=e.payload.options.data.match(/widget-id=(.+?)&/),v=z()(m,2)[1],O="".concat(gt).concat(v),j=t(O);Object(Oe.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var y=_.map(j.fields,"id");o(O),c(y)}}}})(function(){return null}),_t=Object(a.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});n.d(t,"registerContainerType",function(){return tt}),n.d(t,"getContainerType",function(){return nt}),Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var wt=re()?"gutenberg":"classic";Object(c.addAction)("carbon-fields.init","carbon-fields/metaboxes",function(){var e,t;e=wt,t=Object(a.select)("carbon-fields/metaboxes").getContainers(),Object(u.forEach)(t,function(t){rt(t,e)}),function(e){var t=window.cf.config.pagenow;Object(Oe.render)(wp.element.createElement(Oe.Fragment,null,!re()&&wp.element.createElement(Ee,null),("widgets.php"===t||t===yt)&&wp.element.createElement(ht,null),wp.element.createElement(Ot,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(Oe.render)(wp.element.createElement(_t,null),n.appendChild(document.createElement("div")))}(wt)})}]);